Because of a partial projection on a magnetic disk (hereinafter sometimes simply referred to as a disk) etc., a magnetic disk apparatus may not appropriately control levitation (flying of a head). Thus, a head may make contact with a disk, or a head may crash into a disk. (Hereinafter, this phenomenon is referred to as a crash.) When such a crash occurs, a recording error or a reading error is caused due to high levitation of the head associated with the crash, reduction in accuracy of positioning of the head, and high-temperature degaussing by heat generation at the time of contact, etc. In the case where the crash occurs, the disk or head may be damaged. Therefore, the disk or head in the crash is preferably exchanged for a normal one.
In the case where the flying amount of a head from a disk is optimally controlled, an output signal of a head disk interface (HDI) sensor which outputs a signal corresponding to the gap between the head and the disk is used. A waveform in which the output signal passed through a filter does not precisely reflect a waveform showing the crash. Thus, it is difficult to accurately detect a crash by using a signal which passed through the filter.